﻿using Nop.Core;
using Nop.Plugin.Widgets.Carousel.Domain;
using System.Collections.Generic;

namespace Nop.Plugin.Widgets.Carousel.Services
{
    public partial interface ICarouselService
    {
        /// <summary>
        /// Delete Carousel
        /// </summary>
        /// <param name="Carousel">Carousel</param>
        void DeleteCarousel(CarouselObject carousel);

        /// <summary>
        /// Gets Carousel widgetZones
        /// </summary>
        /// <returns>Carousel</returns>
        IList<string> GetCarouselsWidgetZones();

        /// <summary>
        /// Gets all Carousel
        /// </summary>
        /// <param name="name">name</param>
        /// <param name="pageIndex">Page index</param>
        /// <param name="pageSize">Page size</param>
        /// <returns>Carousel</returns>
        IPagedList<CarouselObject> GetAllCarousels(string name = "", int pageIndex = 0, int pageSize = int.MaxValue);

        /// <summary>
        /// Gets Carousels by widgetZones
        /// </summary>
        /// <param name="widgetZones">widgetZones</param>
        /// <returns>Carousel</returns>
        IList<CarouselObject> GetCarouselsByWidgetZones(string widgetZones);

        /// <summary>
        /// Gets a Carousel
        /// </summary>
        /// <param name="CarouselId">Carousel identifier</param>
        /// <returns>Carousel</returns>
        CarouselObject GetCarouselById(int carouselId);

         /// <summary>
        /// Inserts a Carousel
        /// </summary>
        /// <param name="Carousel">Carousel</param>
        void InsertCarousel(CarouselObject carousel);

        /// <summary>
        /// Updates the Carousel
        /// </summary>
        /// <param name="Carousel">Carousel</param>
        void UpdateCarousel(CarouselObject carousel);

        #region Carousel Entity

        /// <summary>
        /// Deletes a Carousel Entity
        /// </summary>
        /// <param name="CarouselEntity">Carousel Entity</param>
        void DeleteCarouselEntity(CarouselEntity carouselEntity);

        /// <summary>
        /// Gets a Carousel Entities by Carousel identifier
        /// </summary>
        /// <param name="CarouselId">The Carousel identifier</param>
        /// <returns>Carousel Entities</returns>
        IList<CarouselEntity> GetCarouselEntitiesByCarouselId(int carouselId);

        /// <summary>
        /// Gets a carousel Entity
        /// </summary>
        /// <param name="carouselEntityId">Carousel Entity identifier</param>
        /// <returns>Carousel Entity</returns>
        CarouselEntity GetCarouselEntityById(int carouselEntityId);

        /// <summary>
        /// Inserts a carousel Entity
        /// </summary>
        /// <param name="carouselEntity">Carousel Entity</param>
        void InsertCarouselEntity(CarouselEntity carouselEntity);

        /// <summary>
        /// Updates a carousel Entity
        /// </summary>
        /// <param name="carouselEntity">Carousel Entity</param>
        void UpdateCarouselEntity(CarouselEntity carouselEntity);

        #endregion

        /// <summary>
        /// Save carousel entity
        /// </summary>
        /// <typeparam name="T">Type</typeparam>
        /// <param name="entity">Entity</param>
        void SaveCarouselEntity<T>(T entity, int carouselId) where T : BaseEntity;

    }
}
